package com.lyc.dao;

import com.lyc.dao.imp.MedalInfoDAOImpl;
import com.lyc.entity.MedalInfo;
import org.junit.jupiter.api.Test;

import java.sql.SQLException;
import java.util.Date;

/**
 * @Program: medal
 * @Author: YC
 * @Date: 2022/5/5 19:17
 */

public class MedalInfoDAOTest {
    private MedalInfoDAO dao = new MedalInfoDAOImpl();

    @Test
    public void insert() throws SQLException {
        dao.insert(new MedalInfo(2,102,1001,1,"100",new Date()));
    }

    @Test
    public void select() throws SQLException{
        System.out.println(dao.selectById(1));
        System.out.println(dao.select(0,1));
    }

    @Test
    public void udateById() throws SQLException{
        dao.updateById(new MedalInfo(1,102,1001,2,"98",new Date()));
    }

    @Test
    public void delete() throws SQLException{
        dao.deleteById(2);
    }
}
